import axios from 'axios'

//获取个人信息
export const getCenter=():any=>{
  return axios.get("/webapi/api/account/my-profile")
}
//修改个人信息
interface IsetCenter {
  email:string,
  userName: string
}
export const setCenter=(params:IsetCenter):any=>{
  return axios.put("/webapi/api/account/my-profile",params,{
    headers:{
      'Content-Type':'application/x-www-form-urlencoded'
    }
  })
}

//修改密码
interface IrestPassword{
  currentPassword: string,
  newPassword: string
}
export const restPassword=(params:IrestPassword):any=>{
  return axios.post("/webapi/api/account/my-profile/change-password",params)
}